package site.marqstree.latte.ec.main.personal.order;

import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemClickListener;

import site.marqstree.latte.ui.recycler.MultipleFields;
import site.marqstree.latte.ui.recycler.MultipleItemEntity;

/*
 * 项目名: EleCommerce
 * 包名: site.marqstree.latte.ec.main.personal.order
 * 文件名: OrderListItemClickListener
 * 创建者: marqstree
 * 创建时间: 2020/2/6 17:33
 * 描述: TODO
 */
public class OrderListItemClickListener implements OnItemClickListener {

    private final OrderListDelegate DELEGATE;

    public OrderListItemClickListener(OrderListDelegate DELEGATE) {
        this.DELEGATE = DELEGATE;
    }

    @Override
    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
        MultipleItemEntity entity = (MultipleItemEntity) adapter.getData().get(position);
        DELEGATE.getSupportDelegate().start(new OrderCommentDelegate(entity.getField(MultipleFields.IMAGE_URL)));
    }
}
